extensions: gggl: conv_rgb8_rgba8(): use 255UL, not 255
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 19 Aug 2016 17:05:17 +0000 (20:05 +0300)
committerØyvind Kolås <pippin@gimp.org>
Sat, 20 Aug 2016 17:36:52 +0000 (19:36 +0200)
Fixes:
gggl.c:758:62: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'

extensions/gggl.c

index 7ab4400dedc60616d26254153d74151010f21433..c4b8ce40f34d6f96433d0c54f1c9b4e1af21e4d2 100644 (file)
@@ -755,7 +755,7 @@ conv_rgb8_rgba8 (unsigned char *src, unsigned char *dst, long samples)
   long n = samples-1;
   while (n--)
     {
-      *(unsigned int *) dst = (*(unsigned int *) src) | (255 << 24);
+      *(unsigned int *) dst = (*(unsigned int *) src) | (255UL << 24);
       src   += 3;
       dst   += 4;
     }